﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Yunpian;

namespace GpUI.Controllers
{
    public class RegisterController : Controller
    {

        public ActionResult Register()//注册
        {
            return View();
        }
        public ActionResult sendmes()
        {
            //接受手机号
            string tel = Request["tel"].ToString();

            //实例化短信接口类
            YunPianSmsClient client = new YunPianSmsClient();
            //发送短信，获取返回值
            var k = client.SendSms(tel);
            return Json(k);




        }
        public int VerifyMes()
        {
            string code = Request["code"].ToString();
            string SessionCode = Session["PhoneCodeString"].ToString();
            if (code == SessionCode)
            {
                return 1;
            }
            else
            {
                return 0;
            }
        }

    }
}
